package pojo.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;

import pojo.bean.Specialty;
import pojo.mapper.SpecialtyMapper;

public class SpecialtyDAO extends AbstractMapperDAO implements SpecialtyMapper {
    private SpecialtyMapper mapper;
    
    public SpecialtyDAO(SqlSessionFactory factory) {
        super(factory);
        mapper = session.getMapper(SpecialtyMapper.class);
    }

    @Override
    public int deleteByPrimaryKey(int specialtyId) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int insert(Specialty record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int insertSelective(Specialty record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public Specialty selectByPrimaryKey(int specialtyId) {
        // TODO 自动生成的方法存根
        return null;
    }

    @Override
    public List<Specialty> selectAll() {
        List<Specialty> specialties;
        try {
            specialties = mapper.selectAll();
        } catch (Exception e) {
            specialties = null;
            e.printStackTrace();
        }
        return specialties;
    }

    @Override
    public int updateByPrimaryKeySelective(Specialty record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Specialty record) {
        // TODO 自动生成的方法存根
        return 0;
    }

}
